Last 5 Days of Possible L.Polyedra Blooms in SoCal Bight

To test implamentation of ipyleaflet.

Code
from pathlib import Path
import json
from ipyleaflet import Map, GeoJSON, LayersControl
from ipywidgets import IntSlider, interact, Layout
from IPython.display import display

poly_path = Path('.')
poly_files = list(poly_path.glob('data/poly_sb*.geojson'))

data_list = []

for file in poly_files:
    with open(file) as f:
        data = json.load(f)
        data_list.append(data)


def random_color(feature):
    return {
        'color': 'gray',
        'fillColor': '#01eeff',
    }


layout = Layout(width='100%', height='700px')

m = Map(center=(34, -119), zoom=8, layout=layout, scroll_wheel_zoom=True)

control = LayersControl(position='topright')
m.add_control(control)

for poly in data_list:

    print(poly['name'])
    name = poly['name']

    geo_json = GeoJSON(
        name=name,
        data=poly,
        style={
            'opacity': .7, 'dashArray': '0', 'fillOpacity': 0.5, 'weight': 1
        },
        hover_style={
            'color': 'white', 'dashArray': '0', 'fillOpacity': 0.4
        },
        style_callback=random_color)
    
    m.add_layer(geo_json)

display(m)
poly_sb_target_20200604_20200608
poly_sb_target_20200609_20200613
poly_sb_target_20200614_20200618
poly_sb_target_20200619_20200623
poly_sb_target_20200624_20200628